import java.util.ArrayList;

public class LaiYiTe extends Method{		
	
	public LaiYiTe(ArrayList<Float> data,int format) {
		super(data,format);
		this.name = "莱以特准则";
	}
	
	public LaiYiTe(ArrayList<Float> data, float alpha, int format){
		this(data,format);
	}

	@Override
	protected boolean hasGrossError() {
	    boolean result = false;
		ArrayList<Float> v = calV(data);
		float sigma = calSigma(data);
		for(int i=0;i<data.size();i++){
			if(Math.abs(v.get(i)) > 3*sigma){
				blackList.add(data.get(i));
				result = true;
			}
		}
		return result;
	}
}
